package homework_06.home_09;

public class Vehicle {
    private String brand;
    private String color;
    private double speed;
    public Vehicle(String brand, String color) {
        this.brand = brand;
        this.color = color;
        this.speed = 0;
    }
    public void setColor(String color){
        this.color=color;
    }
    public void setSpeed(double speed){
        this.speed=speed;
    }
    public void run(){
        System.out.println("一辆品牌为"+brand+",颜色为"+color+"的汽车，以"+speed+"的速度在公路上奔跑");
    }
}
